package ch.ethz.smseth;

import java.util.List;

import android.content.Context;

public abstract class ContactUtil
{
	protected Context _ctx;
	
	public ContactUtil(Context ctx)
	{
		_ctx = ctx;
	}
	
	public abstract Contact fetchContactByNumber(String number);
	public abstract Contact fetchContactByName(String name);
	public abstract List<Contact> fetchContactsByName(String name);
	public abstract List<Contact> fetchContacts(String constraint);
	
	public static ContactUtil get(Context ctx)
	{
		return new ContactUtilCupcake(ctx);
	}
	
	public static class Contact
	{
		public String name;
		public String label;
		public String number;
	}
}
